﻿<%@ Page Language="C#" %>
<%@ Import Namespace="Demo.EntityAccess" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">

</script>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <table border="1" cellpadding="5" style="border-collapse:collapse;" >
        <tr>
            <th>产品编号</th>
            <th>分类</th>
            <th>标题</th>
            <th>价格</th>
            <th>说明</th>
        </tr>
        <% foreach (ProductEntity entity in ProductEntity.GetAllEntities())
           { %>
            <tr>
                <td><%= entity.ProductId %></td>
                <td><%= entity.GetCatelog().Title %></td>
                <td><%= entity.Title %></td>
                <td><%= entity.Price.ToString() %></td>
                <td><%= entity.Description %></td>
            </tr>
        <%} %>
        </table>
    </div>
    </form>
</body>
</html>
